package com.acme.task2;

public class GCTest {
	byte array[] = new byte[1024];

	public static void main(String[] args) {
		/*
		 * "finalize() was called" was printed only at 1000000 iterations
		 * because 1000 and 100000 objects are not enough to use the most part
		 * of dynamics memory and call GC
		 */
		int numberOfIterations = 1000000;
		Foo[] array = new Foo[numberOfIterations];

		for (int i = 0; i < numberOfIterations; i++) {
			Foo foo = new Foo(i);
			array[i] = foo;
		}
	}
}
